﻿@namespace MudBlazor
@using Microsoft.AspNetCore.Components.Routing
@using MudBlazor.Resources
@inherits MudComponentBase
@inject InternalMudLocalizer Localizer

<div class="@GetPanelClass()" @attributes="UserAttributes">
    @if (_sections.Count > 1)
    {
        <MudNavMenu Class="pl-4" aria-label="@Localizer[LanguageResource.MudPageContentNavigation_NavMenu]">
            <MudText Typo="Typo.subtitle1" Class="title" GutterBottom="true">
                @Headline
            </MudText>

            @foreach (var docSection in _sections.OrderBy(x => x.LevelSortingValue))
            {
                <MudNavLink @key="docSection.Id" Match="NavLinkMatch.All" Class="@GetNavLinkClass(docSection)" @onclick="@(e => OnNavLinkClick(docSection.Id))">
                    @docSection.Title
                </MudNavLink>
            }
        </MudNavMenu>
    }
</div>